//
//  SectionFooterCellData.m
//  18Birdies
//
//  Created by Lc on 15/4/28.
//  Copyright (c) 2015年 Lc. All rights reserved.
//

#import "SectionFooterCell.h"
#import "SectionFooterCellData.h"

@implementation SectionFooterCellData

+ (SectionFooterCellData*)cellDataWithTitle:(NSString*)title {
  SectionFooterCellData* cellData = [[self alloc] init];
  cellData.title = title;
  cellData.clickable = NO;
  return cellData;
}

+ (SectionFooterCellData*)cellDataWithAttributeTitle:
    (NSAttributedString*)attributeTitle {
  SectionFooterCellData* cellData = [[self alloc] init];
  cellData.attributeTitle = attributeTitle;
  cellData.clickable = NO;
  return cellData;
}

- (Class)cellClazz {
  return SectionFooterCell.class;
}

- (NSString*)nibName {
  return @"SectionFooterCell";
}

- (void)refreshCell:(SectionFooterCell*)cell {
  [super refreshCell:cell];
  if (self.attributeTitle != nil) {
    cell.titleLabel.attributedText = self.attributeTitle;
  } else {
    cell.titleLabel.text = self.title;
  }
}

@end
